package io.renren.modules.study.common;


import io.renren.modules.schedule.entity.CourseBodyScheduleEntity;

public  class utils {
    static int video=2;
    static int read=1;
    static int test=1;

    public static float getCourseBodySch(CourseBodyScheduleEntity courseBodyScheduleEntity){
        float v=0;

        if(courseBodyScheduleEntity.getVideoSchedule()!=null&&courseBodyScheduleEntity.getVideoSchedule()!=0){
            v=100*courseBodyScheduleEntity.getVideoSchedule()/courseBodyScheduleEntity.getVideoTime();
        }
        float a=v*utils.video+courseBodyScheduleEntity.getIsRead()*utils.read+courseBodyScheduleEntity.getIsTest()*utils.test;
        float b=utils.video+utils.read+utils.test;
        return a/b;
    }
}
